package org.water.base.entity;

import com.thoughtworks.xstream.annotations.XStreamAlias;

/**
 * 返回结果基础bean   主要用于xml json格式返回
 * @author qzy
 *
 */
@XStreamAlias("data")
public class R {

	/**
	 * 编码
	 */
	private int code=200;
	/**
	 * 成功标志
	 */
	private Boolean success=true;
	/**
	 * 返回消息
	 */
	private String msg;
	/**
	 * 返回数据
	 */
	private Object data;
	
	/**
	 * 创建实例
	 * @return
	 */
	public static R instance()
	{
		return new R();
	}
	
	public int getCode() {
		return code;
	}
	public R setCode(int code) {
		this.code = code;
		return this;
	}
	public Boolean getSuccess() {
		return success;
	}
	public R setSuccess(Boolean success) {
		this.success = success;
		return this;
	}
	public String getMsg() {
		return msg;
	}
	public R setMsg(String msg) {
		this.msg = msg;
		return this;
	}
	public Object getData() {
		return data;
	}
	public R setData(Object data) {
		this.data = data;
		return this;
	}
	
	
	
}
